package com.company;

/**
 * 剑指 Offer 58 - II. 左旋转字符串
 */
public class Solution {
    public static String reverseLeftWords(String s, int n) {
        StringBuilder sb=new StringBuilder();
        for (int i=n;i<s.length()+n;i++)
        {
            sb.append(s.charAt(i%s.length()));
        }
        return sb.toString();
    }

    public static void main(String[] args) {
        String s="lrloseumgh";
        int k=6;
        String s1=reverseLeftWords(s,k);
        System.out.println(s1);
    }
}
